package com.futures.investm.utils;

import android.content.Context;
import android.content.Intent;

import com.futures.investm.activity.ArticleActivity;
import com.futures.investm.activity.ArticleDetailsActivity;
import com.futures.investm.activity.ExchangeActivity;
import com.futures.investm.activity.FundActivity;
import com.futures.investm.activity.MarketDetailsActivity;
import com.futures.investm.activity.MsgActivity;
import com.futures.investm.activity.NewsDetailsActivity;
import com.futures.investm.activity.NewsFlashDetailsActivity;
import com.futures.investm.activity.RadioActivity;
import com.futures.investm.common.AboutUsActivity;
import com.futures.investm.common.ChangePasswordActivity;
import com.futures.investm.common.FeedbackActivity;
import com.futures.investm.common.ForgetPwActivity;
import com.futures.investm.common.LoginActivity;
import com.futures.investm.common.ProtocolActivity;
import com.futures.investm.common.RegistActivity;
import com.futures.investm.common.UserActivity;

public class IntentUtils {
    /**
     * 协议
     *
     * @param context
     */
    public static void goProtocol(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ProtocolActivity.class);
        context.startActivity(intent);
    }

    /**
     * 登陆
     *
     * @param context
     */
    public static void goLoginActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, LoginActivity.class);
        context.startActivity(intent);
    }

    /**
     * 注册
     *
     * @param context
     */
    public static void goRegister(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, RegistActivity.class);
        context.startActivity(intent);
    }

    /**
     * 忘记密码
     *
     * @param context
     */
    public static void goForgetPw(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ForgetPwActivity.class);
        context.startActivity(intent);
    }
    public static void goMarketActivity(Context context,int i,String type) {
        Intent intent = new Intent();
        intent.putExtra("i",i);
        intent.putExtra("type",type);
//        intent.setClass(context, MarketActivity.class);
        context.startActivity(intent);
    }
    /**
     * 个人
     *
     * @param context
     */
    public static void goUser(Context context) {
        Intent intent = new Intent();
        intent.setClass(context,UserActivity.class);
        context.startActivity(intent);
    }
    /**
     * 个人
     *
     * @param context
     */
    public static void goFeedbackActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context,FeedbackActivity.class);
        context.startActivity(intent);
    }
    /**
     * 关于
     *
     * @param context
     */
    public static void goAboutUsActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context,AboutUsActivity.class);
        context.startActivity(intent);
    }
    /**
     * 个人设置
     *
     * @param context
     */
    public static void goSetting(Context context) {
        Intent intent = new Intent();
//        intent.setClass(context,Setting.class);
        context.startActivity(intent);
    }
    /**
     * 我的通知
     *
     * @param context
     */
    public static void goMsg(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, MsgActivity.class);
        context.startActivity(intent);
    }

    /**
     * 重置密码
     *
     * @param context
     */
    public static void goChangePassword(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ChangePasswordActivity.class);
        context.startActivity(intent);
    }

    /**
     * 交易所
     * @param context
     */
    public static void goExchangeActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ExchangeActivity.class);
        context.startActivity(intent);
    }
    /**
     * 百科
     * @param context
     */
    public static void goArticleActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ArticleActivity.class);
        context.startActivity(intent);
    }
    /**
     * 电台
     * @param context
     */
    public static void goRadioActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, RadioActivity.class);
        context.startActivity(intent);
    }
    /**
     * 百科详情
     * @param context
     * @param string
     */
    public static void goArticleDetailsActivity(Context context, String string) {
        Intent intent = new Intent();
        intent.setClass(context, ArticleDetailsActivity.class);
        intent.putExtra("id",string);
        context.startActivity(intent);
    }
    /**
     * 首页fragment详情
     * @param context
     * @param title
     * @param images
     * @param time
     * @param content
     */
    public static void goNewsDetailsActivity(Context context, String title, String images, String time, String content) {
        Intent intent = new Intent();
        intent.setClass(context, NewsDetailsActivity.class);
        intent.putExtra("title",title);
        intent.putExtra("img",images);
        intent.putExtra("time",time);
        intent.putExtra("content",content);
        context.startActivity(intent);
    }
    /**
     * 资金流向
     * @param context
     */
    public static void goFundActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, FundActivity.class);
        context.startActivity(intent);
    }
    /**
     * 外汇详情
     *
     * @param context
     * @param
     * @param name
     * @param
     * @param symbol
     */
    public static void goMarketDetailsActivity(Context context, String code,String name,String str,String symbol) {
        Intent sIntent = new Intent();
        sIntent.putExtra("code", code);
        sIntent.putExtra("name", name);
        sIntent.putExtra("str", str);
        sIntent.putExtra("symbol", symbol);
        sIntent.setClass(context, MarketDetailsActivity.class);
        context.startActivity(sIntent);
    }
    /**
     * 新闻详情
     * @param context
     * @param post_title
     * @param published_time
     * @param post_content
     * @param img
     * @param i
     */
    public static void goNewsFlash(Context context, String post_title, String published_time, String post_content, String img, String i) {
        Intent sIntent = new Intent();
        sIntent.putExtra("post_title",post_title);
        sIntent.putExtra("published_time",published_time);
        sIntent.putExtra("post_content",post_content);
        sIntent.putExtra("img",img);
        sIntent.putExtra("i",i);
        sIntent.setClass(context, NewsFlashDetailsActivity.class);
        context.startActivity(sIntent);
    }
}
